/*!
 * \file jxbankafanatp_packet.h
 *
 * \brief JXBANKAFANATP数据包处理
 *
 * All Rights Reserved Copyright (C) 2014 broada,Co.,Ltd.
 *
 * \version 1.0
 * \author songbb
 * \date 2017/04/20
 *
 */

#ifndef __JXBANKAFANATP_PACKET_H_
#define __JXBANKAFANATP_PACKET_H_

#include "jxbankafanatp_core.h"

#define APM_JXBANKAFANATP_PACKET_FRAGMENTED 0    //!< 数据包分片
#define APM_JXBANKAFANATP_PACKET_UNFRAGMENTED 1  //!< 数据包未分片
#define APM_JXBANKAFANATP_PACKET_ERROR 2         //!< 数据包出错

#define APM_JXBANKAFANATP_CHECK_FRAGMENT_SUCCESS 0           //!< 检查数据包是否分片成功
#define APM_JXBANKAFANATP_CHECK_FRAGMENT_NEED_NEXT_PACKET 1  //!< 需要下一个分片包
#define APM_JXBANKAFANATP_CHECK_FRAGMENT_ERROR 2             //!< 检查数据包是否分片出错
#define APM_JXBANKAFANATP_CHECK_FRAGMENT_SKIP 3             //!< 检查数据包成功，但是跳过该包

/*!
 * 初始化JXBANKAFANATP数据包
 *
 * \param p_st_jxbankafanatp_packet  (JXBANKAFANATP数据包)
 *
 * \return 0  失败\n
 *         1  成功
 *
 */
int jxbankafanatp_init_packet(L7_jxbankafanatp_packet *p_st_jxbankafanatp_packet);

/*!
 * 预备需要解析的数据
 *
 * \param p_st_sess         (JXBANKAFANATP的session信息)
 * \param p_st_packet       (协议分析入力数据)
 * \param p_st_jxbankafanatp_packet    (JXBANKAFANATP数据包)
 *
 * \return 0  失败\n
 *         1  成功
 *
 */
int jxbankafanatp_packet_unfragment(L7session_jxbankafanatp *p_st_sess
                        , Apm_packet *p_st_packet
                        , L7_jxbankafanatp_packet *p_st_jxbankafanatp_packet);

#endif
